import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const getTopMenu = () => request({
    url: baseUrl + '/system/top-menu',
    method: 'get'
});

export const listTopMenu=()=>request({
    url: baseUrl + '/system/top-menu/list',
    method: 'get'
})

export const addTopMenu = (data) => request({
    url: baseUrl + '/system/top-menu',
    method: 'post',
    data:data
});

export const updateTopMenu = (data) => request({
    url: baseUrl + '/system/top-menu',
    method: 'put',
    data:data
});

export const deleteTopMenu = (topMenuId) => request({
    url: baseUrl + '/system/top-menu/'+topMenuId,
    method: 'delete'
});

export const configTopMenu = (data) => request({
    url: baseUrl + '/system/top-menu/configTopMenu',
    method: 'put',
    data:data
});